package pjkanri.service;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import pjkanri.entity.Project;

/**
 * Servlet implementation class AccountServlet
 */
@WebServlet("/createProject")
public class CereateProject extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */

	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		// リクエスト・パラメーターの取得

		String id = request.getParameter("project_id");
		String name = request.getParameter("project_name");
		String description = request.getParameter("project_description");

		// project_id INT PRIMARY KEY,
		// project_name VARCHAR(20) NOT NULL,
		// project_description VARCHAR(150) NOT NULL
		
		//insertプロジェクト
//		Project.insert(new Project(id, name, description));		

			String forwardPath = "accountlist.jsp";
			
			// 転送処理
			request.getRequestDispatcher(forwardPath).forward(request, response);
		
		

	}

	


}
